home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #3 / Amiga Plus CD - 2002 - No. 03.iso / AmiSoft / Dev / Mui / Mcc_speedbar.lha / MCC_SpeedBar / Developer / C / Examples / barclass.h < prev    next >
C/C++ Source or Header  |  2002-12-21  |  2KB  |  104 lines

  1.  
  2. #include <proto/exec.h>
  3. #include <proto/utility.h>
  4. #include <proto/muimaster.h>
  5.  
  6. #include <clib/alib_protos.h>
  7. #include <mui/SpeedBar_mcc.h>
  8. #include <mui/muiundoc.h>
  9.  
  10. #include <string.h>
  11.  
  12. /***********************************************************************/
  13.  
  14. #define STDARGS               __stdargs
  15. #define SAVEDS                __saveds
  16. #define ASM                   __asm
  17. #define REG(x)                register __ ## x
  18. #define nfset(obj,attr,value) SetAttrs(obj,MUIA_Group_Forward,FALSE,attr,value,TAG_DONE)
  19.  
  20. /***********************************************************************/
  21. /*
  22. ** Bar Class definitions
  23. */
  24.  
  25. #define _TAG(x) ((int)0xfec0000+10+x)
  26.  
  27. /* Methods */
  28. enum
  29. {
  30.     MUIM_Bar_Set = _TAG(0),
  31.     MUIM_Bar_Notify,
  32.     MUIM_Bar_Disable,
  33.     MUIM_Bar_Active,
  34. };
  35.  
  36. struct MUIP_Bar_Set
  37. {
  38.     ULONG MethodID;
  39.     ULONG button;
  40.     ULONG tag;
  41.     ULONG value;
  42.     ULONG remember;
  43. };
  44.  
  45. struct MUIP_Bar_Notify
  46. {
  47.     ULONG MethodID;
  48.     ULONG button;
  49.     ULONG trigAttr;
  50.     ULONG trigVal;
  51.     APTR  destObj;
  52.     ULONG followParams;
  53.     /* ... */
  54. };
  55.  
  56. struct MUIP_Bar_Disable
  57. {
  58.     ULONG MethodID;
  59.     ULONG disable;
  60. };
  61.  
  62. struct MUIP_Bar_Active
  63. {
  64.     ULONG MethodID;
  65.     ULONG button;
  66. };
  67.  
  68. /* Attributes */
  69. enum
  70. {
  71.     MUIA_Bar_Buttons = _TAG(0),
  72.     MUIA_Bar_Active,
  73. };
  74.  
  75. struct SBButton
  76. {
  77.     STRPTR file;
  78.     STRPTR text;
  79.     STRPTR help;
  80.     UWORD  flags;
  81.     ULONG  exclude;
  82. };
  83.  
  84. enum
  85. {
  86.     MUIV_Button_Flags_Disabled = 1<<0,
  87.     MUIV_Button_Flags_Hide     = 1<<1,
  88.     MUIV_Button_Flags_Toggle   = 1<<2,
  89.     MUIV_Button_Flags_Selected = 1<<3,
  90.     MUIV_Button_Flags_Space    = 1<<4,
  91. };
  92.  
  93. #define SBENTRY(file,text,help,flags,exclude) {(STRPTR)(file),(STRPTR)(text),(STRPTR)(help),(UWORD)(flags),(ULONG)(exclude)}
  94. #define SBBUTTON(file,text,help)              SBENTRY(file,text,help,0,0)
  95. #define SBSPACER                              SBENTRY(MUIV_SpeedBar_Spacer,0,0,0,0)
  96. #define SBEND                                 SBENTRY(MUIV_SpeedBar_End,0,0,0,0)
  97.  
  98. /***********************************************************************/
  99.  
  100. BOOL ASM createBarClass ( REG (a0 )struct MUI_CustomClass **class );
  101. void ASM deleteBarClass ( REG (a0 )struct MUI_CustomClass **class );
  102.  
  103. /***********************************************************************/
  104.